@echo off

setlocal
set build_type=%1

if "%build_type%" == "" (
    set build_type=Release
)

set script_pakcage_dir=%~dp0
echo %script_pakcage_dir%

set conan_dir=%script_pakcage_dir%.conan
set install_dir=%conan_dir%\%build_type%

if exist %install_dir% rd /s /Q %install_dir%
if not exist %conan_dir% md %conan_dir%

xcopy conanfile.txt %conan_dir% /Y
cd %conan_dir%
conan install . -of=%build_type% -b=missing -s build_type=%build_type% -d direct_deploy

endlocal